<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html">

    <h:body>
        <ui:composition template="templates/mainPageLayout.xhtml">
            <ui:define name="activebody">
                <f:view>
                    <h:form id="external">
                        <h:outputLabel value="Name :"/>
                        <h:outputLabel value="#{allservicebean.tranService.name}"/>
                        <br></br>
                        <h:outputLabel value="Terminals :"/>
                        <h:outputLabel value="#{allservicebean.tranService.terminalByTerminal1.point.name} , "/>
                        <h:outputLabel value="#{allservicebean.tranService.terminalByTerminal2.point.name}"/>
                        <br></br>
                        <h:outputLabel value="Route :"/>
                        
                            <ui:repeat value="#{allservicebean.routes}" var="route">
                                    <h:outputText value="-->" />                               
                                    <h:outputText value="#{route.point.name}" />
                            </ui:repeat>
                        
                        <br></br>                        
                        <h:outputLabel value="public opinion polls:"/>
                        <p:rating value="#{allservicebean.rate}" readonly="true" />
                        <p:rating value="#{allservicebean.newrate}" />                        
                        <p:commandButton value="Rate"  actionListener="#{allservicebean.rateMethod()}"/>

                        <h:outputText value="&lt;br/&gt;" escape="false" />
                        <h3 style="margin-top: 0;color: darkolivegreen">Comments</h3>
                        <br></br>
                        <h:dataTable value="#{allservicebean.comments}" var="item">
                            <p:column>
                                <h:outputLabel value="#{item.comment}"/>
                                <h:outputText value="&lt;br/&gt;" escape="false" />  
                                <h:outputLabel value="-----------------------------------------------"/>
                            </p:column>
                        </h:dataTable>
                        <h3 style="margin-top: 0;color: darkolivegreen">Write Your Comment</h3>
                        <p:inputTextarea rows="5" cols="50" value="#{allservicebean.comment}" style="color:black;margin:10px" required="true"/>
                        <p:commandButton value="comment" style="margin:20px" actionListener="#{allservicebean.writeComment()}"/>
                    </h:form>
                </f:view>
            </ui:define>
        </ui:composition>
    </h:body>
</html>